<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="view/default/style/basic.css" />
<link type="text/css" rel="stylesheet" href="view/default/style/cart.css" />
<script type="text/javascript" src="view/default/js/ajax.js"></script>
<script type="text/javascript" src="view/default/js/cart.js"></script>
<title>在线商城会员中心</title>
</head>
<body>
{include file="default/public/header.html"}
<div id="sait">
    当前位置：<a href="./">首页</a> &gt; 购物车
</div>
<table id="cart" cellspacing="1">
    <tr><th>编号</th><th>名称</th><th>属性</th><th class="th">售价</th><th>数量</th><th class="th">小计</th><th class="th">操作</th></tr>
    {assign var=num value=0}
    {foreach from=$myCart key=key item=value}
    <input type="hidden" name="id" value={$value.id} />
    <tr><td>{$value.sn}</td><td>{$value.name}</td><td>
        {foreach from=$value.attr key=k item=v}
            {$k}:
            {foreach from=$v key=k2 item=v2}
            {$v2};
            {/foreach} 
        {/foreach}
    </td>
    <td class="price">{$value.price_sale}元</td><td><input type="text" title="{$num++}" name="num" class="small" value="{$value.num}" onkeyup="changeNum(this,{$value.id},{$value.price_sale})"/> <span class="warning" style="color:red;display:none;">库存不足!</span></td><td style="color:red;" class="sprice" >{$value.total_small}元</td><td><a href="?a=cart&m=delPro&id={$value.id}">删除</a></td></tr>
    {/foreach}
</table>
<p>合计:<strong class="price" id="total">{$total}</strong>元 <a href="{$smarty.cookies.prev}">继续购物</a> | <a href="?a=cart&m=clearCar">清空购物车</a></p>
<input type="hidden" id="t_cart" value="{$smarty.cookies.cart}" />
<p class="flow"><a href="?a=cart&m=flow" id="flow" onclick="return checkCartIsNull();"><img src="view/default/images/checkout.gif" /></a></p>
{include file='default/public/footer.html'}
</body>
</html>